package com.woniuxy.service.impl;

import com.woniuxy.entity.NursingRec;
import com.woniuxy.mapper.NursingRecMapper;
import com.woniuxy.service.NursingRecService;
import com.woniuxy.service.SaasService;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class NursingRecServiceImpl implements NursingRecService , SaasService {
    @Autowired
    NursingRecMapper nursingRecMapper;
    @Override
    public ResponseData<?> addRec(NursingRec nursingRec) {
        nursingRecMapper.addRec(nursingRec);
        return new ResponseData<>().ok();
    }

    @Override
    public ResponseData<?> queryBypatId(Integer patId) {
        List<NursingRec> nursingRecs = nursingRecMapper.queryBypatId(patId);
        return new ResponseData<>().ok(nursingRecs);
    }
}
